<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ page import="struct.SellerInfo" %>
    <%@ page import="struct.CommentInfo" %>
    <%@ page import="java.util.*"  %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1.0, maximum-scale=1">
    <meta name="description" content="Modern UI CSS">
    <meta name="author" content="Sergey Pimenov">
    <meta name="keywords" content="windows 8, modern style, modern ui, style, modern, css, framework">
    
    <meta http-equiv="refresh" content="900" />

    <link href="css/modern.css" rel="stylesheet">
    <link href="css/theme-dark.css" rel="stylesheet">

    <script src="js/assets/jquery-1.8.2.min.js"></script>
    <script src="js/assets/google-analytics.js"></script>
    
    <script src="js/assets/github.info.js"></script>
    <script src="js/modern/tile-slider.js"></script>
    <script src="js/modern/start-menu.js"></script>

    <title>Seller Info</title>

    <style>
        body {
            background: url(icon/wallpaper1.jpg);
        }
    </style>
    
</head>
<body class="metrouicss">

<%
String username = request.getParameter("username");
SellerInfo sellerInfo = (SellerInfo)request.getAttribute("sellerInfo");
ArrayList<CommentInfo> commentInfo = (ArrayList<CommentInfo>)request.getAttribute("commentInfo");
%>

<div class="page secondary fixed-header">
    <div class="page-header ">
        <div class="page-header-content">

            <h1 class="fg-color-white"><%=username%> </h1>
        </div>
    </div>

    <div class="page-region">
	<br>
        <div class="page-region-content tiles">
            			
			<div class="tile-group" style="width: 350px;">
																
				<div class="tile double bg-color-darken">
					<div class="tile-content">
						<p>
                        	<br>
                        	<br>
                        	<br>
                            <h2 align="center"><%=sellerInfo.username %></h2>
                        </p>
					</div>
					<div class="brand">
						<div class="name">Seller</div>
					</div>
				</div>
				

				<div class="tile double bg-color-darken">
					<div class="tile-content">
						<p>
                        	<br>
                        	<br>
                        	<br>
                            <h2 align="center"><%=sellerInfo.rating %>% <small>from <%=sellerInfo.ratingCount %> ratings</small></h2>
                        </p>
					</div>
					<div class="brand">
						<div class="name">Rating</div>
					</div>
				</div>
				
				<div class="tile bg-color-darken">
                    <div class="tile-content">
						<br>
						
							<form action = "/Rate" method = "get">	
					
								<div class="input-control text span1 as-block" >
									<input type="text" name = "rating" maxlength="2" style="background-color: black;"/>
								</div> <br>
							
								<input type="hidden" name="username" value=<%=username %>>
								<input type="hidden" name="seller" value=<%=sellerInfo.username %>>
								<input type="submit" name="rating" value="Rate"/>
							
							</form>
							<div class="brand">
								<div class="name">Out of 10</div>
							</div>
                    </div>	
					
                </div>
                
                <div class="tile bg-color-darken">
                    <div class="tile-content">
						<br>
							<form action = "/SellerInfo" method = "get">		
																
							<input type="hidden" name="username" value=<%=username %>>
							<input type="hidden" name="seller" value=<%=sellerInfo.username %>>
							
							<br><br><br>
							<input type="submit" value="Refresh"/>
						</form>
                    </div>	
					
                </div>
									
            </div>
			
			<div class="tile-group" style="width: 500px;">
			
				<div class="tile triple bg-color-darken">
				
                    <div class="tile-content">
                    
						<form action = "/Comment" method = "get">		
									
							<div class="input-control text span5 as-block" >
								<input type="text" name = "comment" maxlength="50" style="background-color: black;" value = "Comment"/>
							</div> <br>
							
							<input type="hidden" name="username" value=<%=username %>>
							<input type="hidden" name="seller" value=<%=sellerInfo.username %>>
							<input type="submit" value="Comment"/>
						</form>
						
                    </div>	
                </div>
              
			
				<div class="span7">
					
					<div class="notices">
					
						<% for(int i = 0; i < commentInfo.size(); i++) { %>
				
						<div class="bg-color-blueDark">
							<div class="notice-header fg-color-white">
								<%=commentInfo.get(i).commenter %> @ <%=commentInfo.get(i).time %>
							 </div>
							<div class="notice-text"><h4 style="color:white;"><%=commentInfo.get(i).comment %></h4></div>
						</div>
						
						<%} %>
									
					</div>
			
				</div>
			</div>
								
        </div>
    </div>
</div>

</body>
</html>